//
//  CYSpecialTableViewCell.m
//  KCZ_B段项目
//
//  Created by dllo on 15/11/3.
//  Copyright © 2015年 Sky. All rights reserved.
//

#import "CYSpecialTableViewCell.h"
#import "FitHeader.h"
#import <UIImageView+WebCache.h>
#import "FontSizeSingleTon.h"
#define FontSize [[FontSizeSingleTon shareFontSize]array]
@implementation CYSpecialTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatViews];
    }
    return self;
}

-(void)creatViews
{
    _photoImage = [[UIImageView alloc]initWithFrame:CGRectMake(10 * wt, 10 * ht, 120 * wt, 100 * ht)];
    _photoImage.backgroundColor = [UIColor grayColor];
    [self addSubview:_photoImage];
    
    _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(_photoImage.frame.origin.x + _photoImage.frame.size.width + 10 * wt, _photoImage.frame.origin.y, 200 * wt, _photoImage.frame.size.height / 3 - 8 * ht)];
    _titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:[FontSize[0] integerValue]];
    [self addSubview:_titleLabel];
    
    _collectLabel = [[UILabel alloc]initWithFrame:CGRectMake(_titleLabel.frame.origin.x, _titleLabel.frame.origin.y + _titleLabel.frame.size.height + 5 * ht, 200 * wt, 20 * ht)];
    _collectLabel.textColor = [UIColor grayColor];
    _collectLabel.font = [UIFont systemFontOfSize:[FontSize[2] integerValue]];
    [self addSubview:_collectLabel];
    
    _infoLabel = [[UILabel alloc]initWithFrame:CGRectMake(_collectLabel.frame.origin.x, _collectLabel.frame.origin.y + _collectLabel.frame.size.height + 5, 225 * wt, 40 * ht)];
    _infoLabel.textColor = [UIColor grayColor];
    _infoLabel.numberOfLines = 0;
    _infoLabel.font = [UIFont systemFontOfSize:[FontSize[2] integerValue]];
    [self addSubview:_infoLabel];
}

-(void)setSpecial:(CYSpecialModel *)Special
{
    if (_Special != Special) {
        _Special = Special;
    }
    [_photoImage sd_setImageWithURL:[NSURL URLWithString:Special.Cover]placeholderImage:[UIImage imageNamed:@"12090"]];
    _titleLabel.text = Special.Title;
    _collectLabel.text = Special.Collection;
    _infoLabel.text = Special.Content;
}









@end
